Type LibraryExportTextDump Extends LibraryExport

	Method export(lib:Library, fp:TStream)
		Local i:Int
		
		WriteLine(fp, "--------------------------------------------------------------------------------")
		WriteLine(fp, "  " + lib.Name)
		WriteLine(fp, "--------------------------------------------------------------------------------")
		WriteLine(fp, "  Playlists: " + lib.playlists.Count() + "      Tracks: " + lib.tracks.Count())		
		If lib.playlists.Count() > 0 Then
			WriteLine(fp, "")
			WriteLine(fp, "  Playlist listing:")
			i = 1
			lib.playlists.Rewind()
			While lib.playlists.Valid()
				WriteLine(fp, "  " + i + ". "  + lib.playlists.Current().ToString())
				lib.playlists.MoveNext()
				i:+1
			Wend	
		End If
		
		If lib.tracks.Count() > 0 Then
			WriteLine(fp, "")
			WriteLine(fp, "  Track listing:")
			i = 1
			lib.tracks.Rewind()
			While lib.tracks.Valid()
				WriteLine(fp, "  " + i + ". " + lib.tracks.Current().ToString())
				lib.tracks.MoveNext()
				i:+1
			Wend
		End If

		WriteLine(fp, "--------------------------------------------------------------------------------")
		
	End Method

End Type
